<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>ac (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">ui.ac</span>
</div>

<hr/>


  <h2>Classes</h2>
 <div class="fn-constructor">
        <a href="class_goog_ui_ac_ArrayMatcher.html">
          goog.ui.ac.ArrayMatcher</a><br/>
        <div class="class-details">Basic class for matching words in an array</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_ui_ac_AutoComplete.html">
          goog.ui.ac.AutoComplete</a><br/>
        <div class="class-details">This is the central manager class for an AutoComplete instance.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_ui_ac_InputHandler.html">
          goog.ui.ac.InputHandler</a><br/>
        <div class="class-details">Class for managing the interaction between an auto-complete object and a
text-input or textarea.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_ui_ac_Remote.html">
          goog.ui.ac.Remote</a><br/>
        <div class="class-details">Factory class for building a remote autocomplete widget that autocompletes
an inputbox or text area from a data array provided via ajax.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_ui_ac_RemoteArrayMatcher.html">
          goog.ui.ac.RemoteArrayMatcher</a><br/>
        <div class="class-details">An array matcher that requests matches via ajax.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_ui_ac_RenderOptions.html">
          goog.ui.ac.RenderOptions</a><br/>
        <div class="class-details">A simple class that contains options for rendering a set of autocomplete
matches.  Used as an optional argument in the callback from the matcher.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_ui_ac_Renderer.html">
          goog.ui.ac.Renderer</a><br/>
        <div class="class-details">Class for rendering the results of an auto-complete in a drop down list.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_ui_ac_RichInputHandler.html">
          goog.ui.ac.RichInputHandler</a><br/>
        <div class="class-details">Class for managing the interaction between an autocomplete object and a
text-input or textarea.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_ui_ac_RichRemote.html">
          goog.ui.ac.RichRemote</a><br/>
        <div class="class-details">Factory class to create a rich autocomplete widget that autocompletes an
inputbox or textarea from data provided via ajax.  The server returns a
complex data structure that is used with client-side javascript functions to
render the results.</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_ui_ac_RichRemoteArrayMatcher.html">
          goog.ui.ac.RichRemoteArrayMatcher</a><br/>
        <div class="class-details">An array matcher that requests rich matches via ajax and converts them into
rich rows.</div>
 </div>
   
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>




  <h2>Global Functions</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.ui.ac.createSimpleAutoComplete"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.ui.ac.</span><span class="entryName">createSimpleAutoComplete<span class="args">(<span class="arg">data</span>,&nbsp;<span class="arg">input</span>,&nbsp;<span class="arg">opt_multi</span>,&nbsp;<span class="arg">opt_useSimilar</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="class_goog_ui_ac_AutoComplete.html">goog.ui.ac.AutoComplete</a></span></div>
      </div>


     <div class="entryOverview">
       Factory function for building a basic autocomplete widget that autocompletes
an inputbox or text area from a data array.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">data</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Data array.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">input</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Input element or text area.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_multi</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">Whether to allow multiple entries separated with semi-colons or commas.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_useSimilar</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">use similar matches. e.g. "gost" =&gt; "ghost".</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="class_goog_ui_ac_AutoComplete.html">goog.ui.ac.AutoComplete</a></span></div>&nbsp;
            A new autocomplete object.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_ui_ac_ac.js.source.html#line39">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package ui</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="ui.ac"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
